import { ref } from "vue";
import { getBannerAPI } from "@/apis/home";
import { defineStore } from "pinia";

export const useBannerStore = defineStore("banner", () => {
  const bannerList = ref([]);
  const getBanner = async () => {
    const res = await getBannerAPI();
    bannerList.value = res.result;
  };

  return { bannerList, getBanner };
});
